package com.larly.model.enums.notes;

import lombok.Getter;

@Getter
public enum NotesStatusEnum {
    DRAFT("draft", "草稿"),
    PUBLISHED("published", "发布");

    private String key;
    private String value;

    NotesStatusEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public static NotesStatusEnum getByKey(String key) {
        for (NotesStatusEnum value : NotesStatusEnum.values()) {
            if (value.key.equals(key)) {
                return value;
            }
        }
        return null;
    }
}
